<ul class="top-menu">
{% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
    <li>
		<a href="{{ path('fos_user_profile_show') }}">
			{{ 'layout.logged_in_as'|trans({'%username%': app.user.username}, 'FOSUserBundle') }}
		</a> |
	</li>
	<li>
		<a href="{{ path('fos_user_security_logout') }}">
			{{ 'layout.logout'|trans([], 'FOSUserBundle') }}
		</a>
	</li>
{% else %}
    <li>
		<a href="{{ path('fos_user_security_login') }}">{{ 'layout.login'|trans([], 'FOSUserBundle') }}</a>
     </li>
	 <li>
		<a href="{{ path('fos_user_registration_register') }}">
			{{ 'layout.register'|trans([],'FOSUserBundle') }}
		</a>
	</li>
{% endif %}
</ul>
{% for key, flash in app.session.getFlashes() %}
<div class="{{ flash }}">
{{ key|trans([], 'FOSUserBundle') }}
</div>
{% endfor %}